/**
 * 程序员类Coder
 */

public class Coder extends Person {
  private int salary;

  public int getSalary () {
    return salary;
  }

  public void setSalary (int salary) {
    this.salary = salary;
  }
  //无参构造
  public Coder () {}
  //带参构造
  public Coder (String name, int id, int salary) {
    setName(name);
    setId(id);
    setSalary(salary);
  }

  public void work () {
    System.out.println("工号为"+ getId() + "基本工资为" + getSalary() + "的程序员" + getName() + "正在努力的写着代码......");
  }
}